<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
 xmlns:h="http://java.sun.com/jsf/html"
 xmlns:f="http://java.sun.com/jsf/core"
 xmlns:composite="http://java.sun.com/jsf/composite"
 xmlns:c="http://java.sun.com/jsp/jstl/core"
 xmlns:t="http://myfaces.apache.org/tomahawk"
 >
<ui:composition template="../templates/template.xhtml">
<f:loadBundle basename="us.gaaoc.framework.webapp.util.userMessage" var="bundle" />
	<ui:define name="title">
	 	User Profile
	</ui:define>

	<ui:param name="page" value="editProfile" /> 
	<ui:param name="profile" value="editProfile" /> 
	
	<ui:define name="header">
		<ui:include src="/secure/header.xhtml" /> 
	</ui:define>

	<ui:define name="pageTitle">
	<script>
		currentmenu="viewProfile";
	</script>
		<h:outputText style="font-weight:normal;"
						value="#{bundle.editprofile}" />		
	</ui:define>

	<ui:define name="body">
		<h:form>
			<br /> 
			<ul id="tabmenu"  class="nav">
				<!--  <li><a class="active" href="tab1.html">View</a></li> -->
				
				<c:forEach var="link" items="#{userProfile.menu}">
					 <c:choose>
						<c:when test="#{link.navigationRule == profile}">
							<li><h:commandLink styleClass="active" value="#{link.text}" action="#{link.doNavigation}" immediate="true"/></li>
						</c:when>
						<c:otherwise>
							<li><h:commandLink value="#{link.text}" action="#{link.doNavigation}"  immediate="true"/></li>
						</c:otherwise> 
					</c:choose> 
				</c:forEach>
				
				
			</ul>
		
			
			<div id="content">
				<h:panelGrid columns="3" > 			
				<f:facet name="header">
				Edit Profile for user: #{person.firstName} #{person.lastName} 
				</f:facet>
				</h:panelGrid>
				<h:panelGrid columns="3">
				<h:column> 
					Username: 
				</h:column>
				<h:column> 
					#{person.userId} 
				</h:column>
				<h:column> 				
				</h:column>
				<h:column styleClass="fontsubhead"> 
					First Name: 
				</h:column>
				<h:column> 
					<h:inputText id="firstName" value="#{person.firstName}" required="true" /> 
				</h:column>
				<h:column> 
					<h:message for="firstName" styleClass="error" /> 
				</h:column>
				<h:column> 
					Last Name: 
				</h:column>
				<h:column> 
					<h:inputText id="lastName" value="#{person.lastName}" required="true"/> 
				</h:column>
				<h:column> 
					<h:message for="lastName" styleClass="error" /> 
				</h:column>
				<h:column> 
					Email Address: 
				</h:column>
				<h:column> 
					<h:inputText id="email" value="#{person.email}" required="true">
					 <t:validateEmail detailMessage="Invalid Email" /> 
					</h:inputText> 
					
				</h:column>
				<h:column> 
					<h:message for="email" styleClass="error" /> 
				</h:column>
				<h:column> 				
				</h:column>
				<h:column> 				
				</h:column>
				<h:column> 				
				</h:column>

				<h:column> 
					<h:commandButton id="editUserLink" value="Edit" action="#{editUser.editUser}" styleClass="buttonClass" /> 
				</h:column>				
			</h:panelGrid>
				
			</div>


						 
		</h:form>
	</ui:define>

</ui:composition>

</html>
